<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ViewAllDocs.ascx.cs" Inherits="MyCustomModules_ViewAllDocs" %>

<portal:HeadingControl ID="heading" runat="server" Text="View all documents" />


<script type="text/javascript">
    <!--
    function OpenPopUp(val) {
        var popupWidth = 700;
        var popupHeight = 575;
        var left = (screen.width / 2) - (popupWidth / 2);
        var top = (screen.height / 2) - (popupHeight / 2);
        var style = 'width=700,height=575,scrollbars=no,status=no,toolbar=no,resizable=no,location=no,menubar=no,directories=no, top=' + top + ', left=' + left ;
        window.open(val,'name',style);
        return false;
    }
    //-->
</script> 
<asp:UpdatePanel ID="UpdatePanelPersonal" UpdateMode="Conditional" runat="server">


<ContentTemplate>


<!-- PERSONAL DETAILS -->
<div>
List of all documents uploaded<br /><br />

</div>

<asp:GridView ID="grdAllDocs" runat="server" AutoGenerateColumns="False" DataKeyNames="DocID" Width="100%"  >    
    <Columns>         
        <asp:BoundField DataField="DocYear" HeaderText="Year" SortExpression="DocYear" ItemStyle-Width="5%" />
        <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" ItemStyle-Width="25%"/>
        <asp:TemplateField HeaderText="Form 16" SortExpression="FilePath" ItemStyle-Width="55%"> 
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# GetActualFileName( Eval("FilePath")) %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Status" SortExpression="Status" ItemStyle-Width="10%"> 
            <ItemTemplate>
                <asp:HyperLink runat="server" OnClick='<%# GetStatusLink( Eval("DocID")) %>'  ToolTip='<%# Eval("StatusDesc") %>' >
                    <asp:Image ID="Image1" ImageUrl='<%# GetStatusImage( Eval("Status")) %>' runat="server" Width="72" />
                </asp:HyperLink>
               
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="ITRV" SortExpression="ITRV" ItemStyle-Width="5%"> 
            <ItemTemplate>
                <a href="<%# Eval("FilePath") %>" target="_blank" >
                    <asp:Image ID="Image10" ImageUrl='<%# GetITRVImage( Eval("Status")) %>' runat="server" Width="20" />
                </a>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Notes" SortExpression="Post Message" ItemStyle-Width="5%"> 
            <ItemTemplate>
                <asp:HyperLink ID="HyperLink1" runat="server" OnClick='<%# GetPostMessageLink( Eval("DocID")) %>' ToolTip="Click to post message"  >
                    <asp:Image ID="Image10" ImageUrl='~/Images/PostMessage.jpg' runat="server" Width="15" />
                </asp:HyperLink>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns> 
</asp:GridView>

</ContentTemplate>
</asp:UpdatePanel>

